
public class 捺 {
	public static void main(String[] args) {
		int[][] b = { { 1, 2, 3, 5 }, { 2, 4, 6, 8 }, { 1, 2, 3, 4 },{ 1, 2, 3, 4 }};
		int sum = 0;
		for (int i = 0; i < b.length; i++) {
			for (int j = 0; j < b[i].length; j++) {
				if (i == j) {
					sum += b[i][j];
				}
			}
		}
		
		System.out.println(sum);
	}
}
